# /usr/bin/python3
# -*- coding: utf-8 -*-
# @Time    : 2022/1/16 16:08
# @Author  : lt
# @Email   : lt@163.com
# @File    : page_settleaccounts.py
# @Software: PyCharm
from  pages.page_base import PageBase
from  selenium.webdriver.common.by import By
from time import sleep

class PageSettleaccounts(PageBase):
    '''结算界面'''
    payment_locator = (581,1223)#定位去付款按钮
    weixin_pay_locator = (By.XPATH,'//android.widget.TextView[@text=\"微信支付\"]')



    def ele_payment(self):
        '''点击付款按钮'''
        self.driver.tap([(self.payment_locator)])

    def settleaccounts(self):
        '''结算功能'''
        sleep(3)
        self.ele_payment()
        sleep(2)
        text = self.driver.find_element(*self.weixin_pay_locator).get_attribute('text')
        return text